package main

import (
	"fmt"
)

func Sum(a, b int) int {
	return a + b
}
func main() {
	fmt.Print("准备学go咯")
	//循环结构
	for i := 0; i < 5; i++ {
		fmt.Println("报数", i)
	}
	x := []int{1, 2, 3, 4}
	fmt.Print(x[0])
	/**
	  	定义变量
	var i1 int;
	var i2 int=42;
	var i3 =1024;
	i1 =i2-i3;
	fmt.Print(i1);
	*/
	var i1 int
	var i2 int = 42
	var i3 = 1024
	i1 = i2 - i3
	i1 = Sum(i1, i2)
	fmt.Print(i1)

}
